/*
 * @Author: fisher
 * @Date: 2024-02-23 11:52:10
 * @LastEditors: fisher luthor-li@qq.com
 * @LastEditTime: 2024-02-23 17:30:31
 * @FilePath: \allback\models\uefileModel.js
 * @Description:
 */
const mongoose = require('mongoose')
const dayjs = require('dayjs')
const uefileSchema = new mongoose.Schema(
  {
    name: { type: String, required: true },
    path: { type: String, required: true },
    originalPath: { type: String, required: true },
    status: { type: Boolean, default: false },
    uploadDate: { type: String, default: dayjs().format('YYYY-MM-DD HH:mm:ss') }
    // 可以根据需要添加更多字段
  },
  {
    timestamps: true // 开启自动生成时间戳
  }
)

module.exports = mongoose.model('Uefile', uefileSchema)
